package demo;

import java.awt.*;

/**
 * @Description TODO
 * @Author Li
 * @ModifyDate 2023/4/9 23:08
 */
public class GetScreenResolution {
    public static void main(String[] args) {

        Toolkit tk = Toolkit.getDefaultToolkit();
        Dimension screenSize = tk.getScreenSize();
        //宽
        int width = screenSize.width;
        //高
        int height= screenSize.height;
        System.out.println(width);
        System.out.println(height);
    }
}
